table.ENCRYPT Function

Syntax

Result_Flag as L = Encrypt([ Encryption_Key as C ])

Arguments

Encryption_Key

Optional. Default = default encryption key set by the DEFAULT_ENCRYPTION_KEY_SET() function. The character string to use as the encryption key.

Description

Encrypt a database file.

Discussion

The <TBL>.ENCRYPT() method encrypts the table referenced by the object pointer, <TBL>. Result_Flag is .T. if the operation is successful. If Encryption_Key is not specified, Alpha Anywhere uses the default encryption key. The default encryption key can be changed using the DEFAULT_ENCRYPTION_KEY_SET() function. Alpha Anywhere requires exclusive access to the table in order to encrypt it.

Example

Encrypt a table using the default key.

dim t as P
t = table.open("customer")
t.encrypt()
t.close()

Encrypt a table using a specific key.

dim t as P
t = table.open("customer")
t.encrypt("swordfish")
t.close()

See Also